package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.example.vo.ProjectZone;

import java.util.List;

public interface ProjectZoneMapper extends BaseMapper<ProjectZone> {

    @Select("select\n" +
            "\tp.id,\n" +
            "\tp.name,\n" +
            "\tz.id zone_id,\n" +
            "\tz.city zone_name\n" +
            "from\n" +
            "\tpm_project p\n" +
            "left join pm_user z on\n" +
            "\tz.id = p.charge_user_id")
    List<ProjectZone> findAllProjects();

}
